export default {
	state:{
		// 登录状态
		loginStatus:false,
		// 存储区信息
		development:[],
		resState:[],
		// 用户信息
		userInfo:"",
		latitude: 30.5034102,
		longitude: 114.601571,
		currentAddress:"",
		//微信头像昵称
		wxuserInfo:{},
		//当前是否开启了定位
		isdw:true
	},
	getters:{},
	mutations:{
		//登录
		Login(state,userinfo){
			state.loginStatus= true;
			state.userInfo = userinfo;
			uni.setStorageSync('userInfo',JSON.stringify(userinfo))
		},
		// 退出登录
		logout(state){
			state.userInfo = {}
			state.wxuserInfo = {}
			state.loginStatus = false
			state.token = null
			uni.removeStorageSync('userInfo')
		},
		//获取用户信息
		myuserInfo(state,Myinfo){
			state.MyInfo = Myinfo;
			uni.setStorageSync('MyInfo',JSON.stringify(Myinfo))
		},
		//重新赋值登录状态
		isLogin(state,login){
			state.loginStatus = login
		},
		//对用户数据重新赋值
		isUserInfo(state,userinfo){
			state.userInfo = userinfo;
		},
		setdevelopment(state,developments){
			state.development = developments;
		},
		setstate(state,res){
			state.resState = res;
		},
		getposition(state,res){
			state.latitude = res.latitude;
			state.longitude = res.longitude
		},
		currentAddress(state,res){
			state.currentAddress = res
		},
		//存储微信头像昵称
		setwxuserInfo(state,wx){
			state.wxuserInfo = wx
			uni.setStorageSync('wxuserInfo',JSON.stringify(wx))
		},
		setrefresh(state,wx){
			state.wxuserInfo = wx
		},
		dw(state,dw){
			state.isdw = dw
		}
	},
	actions:{}
}